﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// App_Version数据模型对象
    /// </summary>
    [Serializable]
    public partial class App_VersionMod
    {
        /// <summary>
        /// 初始化App_Version数据模型对象
        /// </summary>
        public App_VersionMod()
        {
            
        }
        /// <summary>
        /// 初始化App_Version数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="content">content</param>
        /// <param name="ctime">ctime</param>
        public App_VersionMod(long id,string content,DateTime ctime)
        {
            //给id字段赋值
            this.Id = id;
            //给content字段赋值
            this.Content = content;
            //给ctime字段赋值
            this.Ctime = ctime;
        }
        /// <summary>
        /// 初始化App_Version数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="version">version</param>
        /// <param name="mode">mode</param>
        /// <param name="content">content</param>
        /// <param name="ctime">ctime</param>
        public App_VersionMod(long id,string version,string mode,string content,DateTime ctime)
        {
            //给id字段赋值
            this.Id = id;
            //给version字段赋值
            this.Version = version;
            //给mode字段赋值
            this.Mode = mode;
            //给content字段赋值
            this.Content = content;
            //给ctime字段赋值
            this.Ctime = ctime;
        }
        
		//属性存储数据的变量
        private long _id;
        private string _version;
        private string _mode;
        private string _content;
        private DateTime _ctime;
        
        /// <summary>
        /// id
        /// </summary>
        public long Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// version
        /// </summary>
        public string Version
        {
            get { return this._version; }
            set { this._version = value; }
        }
        /// <summary>
        /// mode
        /// </summary>
        public string Mode
        {
            get { return this._mode; }
            set { this._mode = value; }
        }
        /// <summary>
        /// content
        /// </summary>
        public string Content
        {
            get { return this._content; }
            set { this._content = value; }
        }
        /// <summary>
        /// ctime
        /// </summary>
        public DateTime Ctime
        {
            get { return this._ctime; }
            set { this._ctime = value; }
        }
        
        /// <summary>
        /// 对比两个App_Version数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的App_Version数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成App_Version数据模型对象
            App_VersionMod app_VersionMod = obj as App_VersionMod;
            //判断是否转换成功
            if (app_VersionMod == null) return false;
            //进行匹配属性的值
            return
                //判断id是否一致
                this.Id == app_VersionMod.Id &&
                //判断version是否一致
                this.Version == app_VersionMod.Version &&
                //判断mode是否一致
                this.Mode == app_VersionMod.Mode &&
                //判断content是否一致
                this.Content == app_VersionMod.Content &&
                //判断ctime是否一致
                this.Ctime == app_VersionMod.Ctime;
        }
        /// <summary>
        /// 将当前App_Version数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将App_Version数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将id进行按位异或运算处理
                this.Id.GetHashCode() ^
                //将version进行按位异或运算处理
                (this.Version == null ? 2147483647 : this.Version.GetHashCode()) ^
                //将mode进行按位异或运算处理
                (this.Mode == null ? 2147483647 : this.Mode.GetHashCode()) ^
                //将content进行按位异或运算处理
                (this.Content == null ? 2147483647 : this.Content.GetHashCode()) ^
                //将ctime进行按位异或运算处理
                this.Ctime.GetHashCode();
        }
        /// <summary>
        /// 将当前App_Version数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前App_Version数据模型对象转换成字符串副本
            return
                "[" +
                //将id转换成字符串
                this.Id + "," +
                //将content转换成字符串
                this.Content + "," +
                //将ctime转换成字符串
                this.Ctime +
                "]";
        }
    }
}
